<!DOCTYPE html>
<html lang="zxx">

<head>
    <title>Elvis首页</title>
    <!-- Meta tag Keywords -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="UTF-8"/>
    <meta name="keywords" content=""/>
    <script>
        addEventListener("load", function () {
            setTimeout(hideURLbar, 0);
        }, false);

        function hideURLbar() {
            window.scrollTo(0, 1);
        }
    </script>
    <!-- //Meta tag Keywords -->

    <!-- Custom-Files -->
    <link rel="stylesheet" href="css/bootstrap.css">
    <!-- Bootstrap-Core-CSS -->
    <link href="css/css_slider.css" type="text/css" rel="stylesheet" media="all">
    <!-- banner slider -->
    <link rel="stylesheet" href="css/style.css" type="text/css" media="all"/>
    <!-- Style-CSS -->
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <!-- Font-Awesome-Icons-CSS -->
    <!-- //Custom-Files -->
    <link rel="stylesheet" href="./layui/css/layui.css" media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    <script src="./layui/layui.js" charset="utf-8"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
    <!-- Web-Fonts -->
    <link href="http://fonts.googleapis.com/css?family=Crimson+Text:400,400i,600,600i,700,700i" rel="stylesheet">
    <link href="http://fonts.googleapis.com/css?family=Oxygen:300,400,700&amp;subset=latin-ext" rel="stylesheet">
    <!-- //Web-Fonts -->

</head>

<form id="pinglun" style="margin:25px;display:none" class="layui-form" action="" lay-filter="example">
    <div class="layui-form-item">
        <label class="layui-form-label">名字</label>
        <div class="layui-input-block">
            <input type="hidden" id="yc1">
            <input type="text" name="user" lay-verify="title" autocomplete="off" placeholder="请输入标题"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">星级</label>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
        <div id="test33"></div>
        <input id="number" name="star" type="text" value="" class="satisfaction" style="display: none">
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">评论</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入内容" class="layui-textarea" name="comment"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-block">
            <input type="hidden" name="bid" value="" required lay-verify="required" lay-filter="example" placeholder=""
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit="" lay-filter="formDemo1">立即提交</button>
        </div>
    </div>
</form>

<body>


<!--开启星星-->
<script>
    layui.use(['rate', 'jquery'], function () {
        var rate = layui.rate;
        $ = layui.jquery;
        rate.render({
            elem: '#test33'
            , value: 0 //初始值
            , half: true //开启半星
            , text: true
            , setText: function (value) {
                var arrs = {};
                this.span.text(arrs[value]);
                $("#number").val(value);
            }
        })
    });
</script>

<!--头-->
<div class="main-top" id="home">
    <!-- 头 -->
    <header>
        <div class="container-fluid">
            <div class="header d-md-flex justify-content-between align-items-center py-3 px-xl-5 px-lg-3 px-2">
                <!-- logo -->
                <div  id="logo">
                    <h1><a  href="index.html">
                        &nbsp&nbsp&nbsp&nbsp<img style="width: 70px; height: 65px" src="images/logo111.png">
                    </a>
                    </h1>

                </div>

                <!-- //logo -->
                <!-- nav -->
                <div class="nav_w3ls">
                    <nav>
                        <label for="drop" class="toggle">Menu</label>
                        <input type="checkbox" id="drop"/>
                        <ul class="menu">
                            <li><a href="index.html" class="active">首页</a></li>
                            <li><a href="about.html">关于我们</a></li>
                            <li><a href="brand.html?bcategory=all">所有品牌</a></li>
                            <li>
                                <!-- First Tier Drop Down -->
                                <label for="drop-2" class="toggle toogle-2">Dropdown<span class="fa fa-angle-down"
                                                                                          aria-hidden="true"></span>
                                </label>
                                <a href="#">相关功能<span class="fa fa-angle-down" aria-hidden="true"></span></a>
                                <input type="checkbox" id="drop-2"/>
                                <ul>
                                    <li><a href="#services" class="drop-text">热度最高</a></li>
                                    <li><a href="#blog" class="drop-text">优秀品牌介绍</a></li>
                                    <li><a href="#why" class="drop-text">我们的服务</a></li>
                                    <li><a href="#price" class="drop-text">各大品牌</a></li>
                                    <li><a href="#testi" class="drop-text">优质评价</a></li>
                                    <li><a href="book.html" class="drop-text">加入我们</a></li>
                                    <li><a href="http://192.168.1.147:8080/page/login/login.html" class="drop-text">后台管理</a></li>
                                </ul>
                            </li>
                            <li><a href="contact.html">联系我们</a></li>
                        </ul>
                    </nav>
                </div>
                <!-- //nav -->
            </div>
        </div>
    </header>
    <!-- //头 -->

    <!-- banner -->
    <div class="banner_w3lspvt">
        <div class="csslider infinity" id="slider1">
            <input type="radio" name="slides" checked="checked" id="slides_1"/>
            <input type="radio" name="slides" id="slides_2"/>
            <input type="radio" name="slides" id="slides_3"/>
            <input type="radio" name="slides" id="slides_4"/>
            <ul class="banner_slide_bg">
                <li>
                    <div class="container">
                        <div class="w3ls_banner_txt">

                            <h3 class="w3ls_pvt-title text-wh text-uppercase let">欢迎来到Elvis</h3>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="container">
                        <div class="w3ls_banner_txt">
                            <p>欢迎来到埃尔维斯</p>
                            <h3 class="w3ls_pvt-title text-wh text-uppercase let">享受你的美</h3>

                        </div>
                    </div>
                </li>
                <li>
                    <div class="container">
                        <div class="w3ls_banner_txt">
                            <p>欢迎来到埃尔维斯</p>
                            <h3 class="w3ls_pvt-title text-wh text-uppercase let">享受你的美</h3>

                        </div>
                    </div>
                </li>
                <li>
                    <div class="container">
                        <div class="w3ls_banner_txt">
                            <p>欢迎来到埃尔维斯</p>
                            <h3 class="w3ls_pvt-title text-wh text-uppercase let">享受你的美</h3>

                        </div>
                    </div>
                </li>
            </ul>
            <div class="arrows">
                <label for="slides_1"></label>
                <label for="slides_2"></label>
                <label for="slides_3"></label>
                <label for="slides_4"></label>
            </div>
        </div>
    </div>
    <!-- //banner -->
</div>


<!-- 关于我们 -->
<section class="about py-5" id="about">
    <div class="container py-xl-5 py-lg-3">
        <div class="row py-md-5">
            <div class="col-lg-4 about-left-w3pvt offset-lg-1 mt-lg-4">
                <div class="main-img">
                    <img src="images/blog1.jpg" alt="" class="img-fluid pos-aboimg">
                    <img src="images/blog2.jpg" alt="" class="img-fluid pos-aboimg2">
                </div>
            </div>
            <div class="col-xl-6 col-lg-7 about-right offset-xl-1">

                <h3 class="tittle-w3layouts text-uppercase pr-lg-5 mt-2">关于我们</h3>
                <p class="mt-4 mb-4" id="inc21"></p>
                <p id="inc22"></p>
                <a href="about.html" class="btn button-style-2 mt-sm-5 mt-4">更多</a>
            </div>
        </div>
    </div>
</section>

<!-- 三种品牌分类 -->
<div class="rooms-w3ls bg-li py-5" id="price">
    <div class="container-fluid py-xl-5 py-lg-3">
        <h3 class="tittle text-center text-bl font-weight-bold">各大品牌</h3>
        <p id="inc31" class="sub-tittle text-center mt-2 mb-sm-5 mb-4 pb-xl-3"></p>
        <div class="row">
            <div class="col-lg-4 price-mobamus">
                <div class="price-top">
                    <a href="brand.html?bcategory=1">
                        <img src="images/d9.jpg" id="om1" name="1" alt="" class="img-fluid"/>
                    </a>
                </div>
                <div bcategory="0" class="price-w3ls-bottom p-4">
                    <h4 class="my-2"><a href="brand.html?bcategory=1">欧美品牌</a></h4>

                    <ul class="style-lists">
                        <li id="inc32"></li>
                        <li id="inc33"></li>
                        <li id="inc34"></li>
                    </ul>
                    <a bcategory="0" href="omnews.html?bcategory=1" class="btn button-style-2 mt-sm-5 mt-4">更多</a>
                </div>
            </div>
            <div class="col-lg-4 price-mobamus my-lg-0 my-5">
                <div class="price-top">
                    <a href="brand.html?bcategory=2">
                        <img src="images/d7.jpg" alt="" class="img-fluid"/>
                    </a>
                </div>
                <div bcategory="1" class="price-w3ls-bottom p-4">
                    <h4 class="my-2"><a href="brand.html?bcategory=2">国产品牌</a></h4>
                    <ul class="style-lists">
                        <li id="inc35"></li>
                        <li id="inc36"></li>
                        <li id="inc37"></li>
                    </ul>
                    <a bcategory="1" href="gcnews.html?bcategory=2" class="btn button-style-2 mt-sm-5 mt-4">更多</a>
                </div>
            </div>
            <div class="col-lg-4 price-mobamus">
                <div class="price-top">
                    <a href="brand.html?bcategory=3">
                        <img src="images/d8.jpg" alt="" class="img-fluid"/>
                    </a>
                </div>
                <div bcategory="2" class="price-w3ls-bottom p-4">
                    <h4 class="my-2"><a href="rhpinpai.html?bcategory=3">日韩品牌</a></h4>

                    <ul class="style-lists">
                        <li id="inc38"></li>
                        <li id="inc39"></li>
                        <li id="inc310"></li>
                    </ul>
                    <a bcategory="2" href="rhnews.html?bcategory=3" class="btn button-style-2 mt-sm-5 mt-4">更多</a>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 想后台传值 -->
<script>
    layui.use(['table'], function () {
        var table = layui.table;
        var $ = layui.$;
        $("#om1,#om2").on("click", function () {
            $.ajax({
                url: '/brand/toompinpai',
                data: {name: 1},
                type: 'get',
                success: function () {
                }
            });
        });
    });
</script>


<!-- 我们提供的服务 -->
<div class="serives py-5" id="why">
    <div class="container py-xl-5 py-lg-3">
        <h3 class="tittle text-center text-bl font-weight-bold">我们服务</h3>
        <p id="inc41" class="sub-tittle text-center mt-2 mb-sm-5 mb-4 pb-xl-3"></p>
        <div style='height: 300px;'class="row text-center">
            <div   class="col-lg-3 col-md-6 ser-grid">
                <span class="fa fa-cutlery"></span>
                <h4>品牌宣传</h4>
                <p id="inc42"></p>
            </div>
            <div class="col-lg-3 col-md-6 ser-grid mt-md-0 mt-5">
                <span class="fa fa-money"></span>
                <h4>品牌主打产品</h4>
                <p id="inc43"></p>
            </div>
            <div  class="col-lg-3 col-md-6 ser-grid mt-lg-0 mt-5">
                <span class="fa fa-user-secret"></span>
                <h4>美妆流程</h4>
                <p id="inc44"></p>
            </div>
            <div class="col-lg-3 col-md-6 ser-grid mt-lg-0 mt-5">
                <span class="fa fa-car"></span>
                <h4>化妆品发展历史</h4>
                <p id="inc45"></p>
            </div>
        </div>
    </div>
</div>
<!--<script>-->
    <!--function run1() {-->
        <!--layui.use(['element'], function () {-->
            <!--var $ = layui.$;-->
            <!--$.ajax({-->
                <!--url: '/video/findVideo',-->
                <!--type: 'get',-->
                <!--success: function (map) {-->
                    <!--$("#video1").append("<video style='width: 200px;height: 250px;' id='countb' muted  autoplay='autoplay' src='"+map.data[0].lujing+"'></video>")-->
                <!--}-->
            <!--});-->
        <!--});-->
    <!--}-->

    <!--function runout1() {-->
        <!--layui.use(['element'], function () {-->
            <!--var $ = layui.$;-->
            <!--$("#countb").remove()-->
        <!--});-->
    <!--}-->

    <!--function run2() {-->
        <!--layui.use(['element'], function () {-->
            <!--var $ = layui.$;-->
            <!--$.ajax({-->
                <!--url: '/video/findVideo',-->
                <!--type: 'get',-->
                <!--success: function (map) {-->
                    <!--$("#video2").append("<video style='width: 200px;height: 230px;' id='countb' muted  autoplay='autoplay' src='"+map.data[1].lujing+"'></video>")-->
                <!--}-->
            <!--});-->
        <!--});-->
    <!--}-->

    <!--function runout2() {-->
        <!--layui.use(['element'], function () {-->
            <!--var $ = layui.$;-->
            <!--$("#countb").remove()-->
        <!--});-->
    <!--}-->

    <!--function run3() {-->
        <!--layui.use(['element'], function () {-->
            <!--var $ = layui.$;-->
            <!--$.ajax({-->
                <!--url: '/video/findVideo',-->
                <!--type: 'get',-->
                <!--success: function (map) {-->
                    <!--$("#video3").append("<video style='width: 200px;height: 230px;' id='countb' muted  autoplay='autoplay' src='"+map.data[2].lujing+"'></video>")-->
                <!--}-->
            <!--});-->
        <!--});-->
    <!--}-->

    <!--function runout3() {-->
        <!--layui.use(['element'], function () {-->
            <!--var $ = layui.$;-->
            <!--$("#countb").remove()-->
        <!--});-->
    <!--}-->

    <!--function run4() {-->
        <!--layui.use(['element'], function () {-->
            <!--var $ = layui.$;-->
            <!--$.ajax({-->
                <!--url: '/video/findVideo',-->
                <!--type: 'get',-->
                <!--success: function (map) {-->
                    <!--$("#video4").append("<video style='width: 200px;height: 200px;' id='countb' muted  autoplay='autoplay' src='"+map.data[3].lujing+"'></video>")-->
                <!--}-->
            <!--});-->
        <!--});-->
    <!--}-->

    <!--function runout4() {-->
        <!--layui.use(['element'], function () {-->
            <!--var $ = layui.$;-->
            <!--$("#countb").remove()-->
        <!--});-->
    <!--}-->

<!--</script>-->

<!-- 实时显示 -->
<div class="stats py-5">
    <div class="container py-xl-5 py-lg-3">
        <div class="row stats-mobamu py-5">
            <div class="col-lg-4 col-md-6">
                <div class="stats-grid">
                    <div class="row">
                        <div class="col-4 text-center">
                            <span class="fa fa-star"></span>
                        </div>
                        <div class="col-8">
                            <h4 id="countc" class="numscroller"></h4>
                            <p>优秀的评级</p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 mt-md-0 mt-4">
                <div class="stats-grid">
                    <div class="row">
                        <div class="col-4 text-center">
                            <span class="fa fa-smile-o"></span>
                        </div>
                        <div class="col-8">
                            <h4 id="countpeople" class="numscroller"></h4>
                            <p>访问量</p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 mx-lg-0 mx-md-auto mt-lg-0 mt-4">
                <div class="stats-grid">
                    <div class="row">
                        <div class="col-4 text-center">
                            <span class="fa fa-cutlery"></span>
                        </div>
                        <div class="col-8">
                            <h4 id="countb" class="numscroller"></h4>
                            <p>大牌加盟</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>

    layui.use(['element'], function () {
        var $ = layui.$;


        $.ajax({
            url: '/comment/countc',
            type: 'get',

            success: function (map) {

                $("#countc").append("<a>" + map + "</a>")

            }
        });


        $.ajax({
            url: '/brand/PV',
            type: 'get',

            success: function (map) {

                $("#countpeople").append("<a>" + map.top + "</a>")

            }
        });
        $.ajax({
            url: '/brand/countall',
            type: 'get',

            success: function (map) {

                $("#countb").append("<a>" + map + "</a>")

            }
        });


        layui.use('layer', function () {
            var $ = layui.jquery, layer = layui.layer;
            if (getCookie("username") != "li") {
                window.onload = function () {
                    $.ajax({
                        url: '/comment/rand',
                        type: 'post', success: function (map) {
                            document.cookie = "username=li; Max-Age=7200000";
                        }
                    });
                }
            }
        });
    });

    function getCookie(cookieName) {
        var cookieStr = unescape(document.cookie);
        var arr = cookieStr.split("; ");
        var cookieValue = "";
        for (var i = 0; i < arr.length; i++) {
            var temp = arr[i].split("=");
            if (temp[0] == cookieName) {
                cookieValue = temp[1];
                break;
            }
        }
        return cookieValue;
    }


</script>
<!-- 优秀品牌3个 -->
<div class="blog-w3ls py-5" id="blog">
    <div class="container py-xl-5 py-lg-3">
        <h3 class="tittle text-center text-bl font-weight-bold">优秀品牌介绍</h3>
        <p id="inc51" class="sub-tittle text-center mt-2 mb-sm-5 mb-4 pb-xl-3"></p>
        <div class="row package-grids">
            <div class="col-lg-4 posts-mobamus">
                <div style="width:300px; height:50px;" class="posts-top">

                    <h3>1
                        <span>Top</span>
                    </h3>
                </div>
                <a style="width:300px; height:200px;" id="zhuan1">
                    <img style="width:300px; height:200px;" ID="img11" alt="" class="img-fluid"/>
                </a>
                <div class="posts-w3ls-bottom py-4">
                    <h4 class="mb-2"><a id="top1"></a></h4>
                    <ul class="list-unstyled">
                        <li>
                            <a href="javascript:void(0)" id="qw1" onclick="dianzan();">
                                <span class="fa fa-thumbs-up mr-1" id="zan1"></span><a id="x1"></a><a id="xh1">喜欢</a> </a>
                        </li>
                        <li class="mx-3">
                            <a href="javascript:void(0)" id="qw4" onclick="pinglun1();">
                                <span class="fa fa-comments mr-1" id="ping1"></span> 评价</a>
                        </li>
                    </ul>
                    <p id="bin1" class="mt-3">品牌介绍</p>
                </div>
            </div>
            <div class="col-lg-4 posts-mobamus my-lg-0 my-4">
                <div style="width:300px; height:50px;" class="posts-top">

                    <h3>2
                        <span>Top</span>
                    </h3>
                </div>
                <a style="width:300px; height:200px;" id="zhuan2">
                    <img style="width:300px; height:200px;" id="img22" alt="" class="img-fluid"/>
                </a>
                <div class="posts-w3ls-bottom py-4">
                    <h4 class="mb-2"><a id="top2"></a></h4>
                    <ul class="list-unstyled">
                        <li>
                            <a href="javascript:void(0)" id="qw2" onclick="dianzan();">
                                <span class="fa fa-thumbs-up mr-1" id="zan2"></span><a id="x2"></a><a id="xh2">喜欢</a> </a>
                        </li>
                        <li class="mx-3">
                            <a href="javascript:void(0)" id="qw5" onclick="pinglun2();">
                                <span class="fa fa-comments mr-1" id="ping2"></span> 评论</a>
                        </li>
                    </ul>
                    <p id="bin2" class="mt-3">品牌评价</p>
                </div>
            </div>
            <div class="col-lg-4 posts-mobamus">
                <div style="width:300px; height:50px;" class="posts-top">

                    <h3>3
                        <span>Top</span>
                    </h3>
                </div>
                <a style="width:300px; height:200px;" id="zhuan3">
                    <img style="width:300px; height:200px;" id="img33" alt="" class="img-fluid"/>
                </a>
                <div class="posts-w3ls-bottom py-4">
                    <h4 class="mb-2"><a id="top3"></a></h4>
                    <ul class="list-unstyled">
                        <li>
                            <a href="javascript:void(0)" id="qw3" onclick="dianzan();">
                                <span class="fa fa-thumbs-up mr-1" id="zan3"></span><a id="x3"></a><a id="xh3">喜欢</a> </a>
                        </li>
                        <li class="mx-3">
                            <a href="javascript:void(0)" id="qw6" onclick="pinglun3();">
                                <span class="fa fa-comments mr-1" id="ping3"></span>评价</a>
                        </li>
                    </ul>
                    <p id="bin3" class="mt-3">品牌介绍</p>
                </div>
            </div>
        </div>
    </div>
</div>
<!--改优秀品牌名字-->
<script>
    layui.use(['element'], function () {
        var $ = layui.$;
        $.ajax({
            url: '/brand/showExcellent',
            type: 'get',
            success: function (map) {

                $("#img11").attr("src", map.top[0].blogo)
                $("#img22").attr("src", map.top[1].blogo)
                $("#img33").attr("src", map.top[2].blogo)


                $("#zan1").attr("myname", map.top[0].bid)
                $("#zan2").attr("myname", map.top[1].bid)
                $("#zan3").attr("myname", map.top[2].bid)


                $("#zhuan1").prop("href", map.top[0].bwebsite)
                $("#top1").prop("href", map.top[0].bwebsite)
                $('#top1').append("<a>" + map.top[0].bname + "</a>")
                $("#zan1").append("<a id='z1'>" + map.top[0].enjoy + "</a>")
                $("#ping1").append("<a  id='p1'>" + map.top[0].pls + "</a>")
                $("#bin1").append("<a>" + map.top[0].binfo + "</a>")

                $("#zhuan2").prop("href", map.top[1].bwebsite)
                $("#top2").prop("href", map.top[1].bwebsite)
                $('#top2').append("<a>" + map.top[1].bname + "</a>");
                $("#zan2").append("<a id='z2'>" + map.top[1].enjoy + "</a>")
                $("#ping2").append("<a  id='p2'>" + map.top[1].pls + "</a>")
                $("#bin2").append("<a>" + map.top[1].binfo + "</a>")

                $("#zhuan3").prop("href", map.top[2].bwebsite)
                $("#top3").prop("href", map.top[2].bwebsite)
                $('#top3').append("<a>" + map.top[2].bname + "</a>");
                $("#zan3").append("<a id='z3'>" + map.top[2].enjoy + "</a>")
                $("#ping3").append("<a  id='p3'>" + map.top[2].pls + "</a>")
                $("#bin3").append("<a>" + map.top[2].binfo + "</a>")
            }
        });
        $("#qw1").click(function () {
            var lastname = localStorage.getItem("dianzan");
            if (lastname == null) {
                $.ajax({
                    url: "/brand/dianzan",
                    type: "POST",
                    data: {
                        bid: $("#zan1").attr("myname")
                    },
                    success: function (data) {
                        $("#x11").remove();
                        $("#xh1").remove();
                        $("#x1").append("<a id='x11'>不喜欢</a>")
                        localStorage.setItem("dianzan", 0);
                        layer.msg('点赞成功', {
                            time: 1000, //20s后自动关闭
                        });
                        layui.use(['element'], function () {
                            var $ = layui.$;
                            $.ajax({
                                url: '/brand/showExcellent',
                                type: 'get',
                                success: function (map) {
                                    $("#z1").remove();
                                    $("#zan1").append("<a id='z1'>" + map.top[0].enjoy + "</a>")
                                }
                            });
                        });
                    }
                })
            } else if (lastname == 0) {
                $.ajax({
                    url: "/brand/quxiaodianzan",
                    type: "POST",
                    data: {
                        bid: $("#zan1").attr("myname")
                    },
                    success: function (data) {
                        $("#x11").remove();
                        $("#xh1").remove();
                        $("#x1").append("<a id='x11'>喜欢</a>")
                        //$("#x11").remove();
                        localStorage.removeItem("dianzan");
                        layer.msg('取消', {
                            time: 1000, //20s后自动关闭
                        });
                        layui.use(['element'], function () {
                            var $ = layui.$;
                            $.ajax({
                                url: '/brand/showExcellent',
                                type: 'get',
                                success: function (map) {
                                    $("#z1").remove();

                                    $("#zan1").append("<a id='z1'>" + map.top[0].enjoy + "</a>")
                                }
                            });
                        });
                    }
                })
            }
        });
        $("#qw2").click(function () {
            var lastname1 = localStorage.getItem("dianzan1");
            if (lastname1 == null) {
                $.ajax({
                    url: "/brand/dianzan",
                    type: "POST",
                    data: {
                        bid: $("#zan2").attr("myname")
                    },
                    success: function (data) {
                        $("#x22").remove();
                        $("#xh2").remove();
                        $("#x2").append("<a id='x22'>不喜欢</a>")
                        localStorage.setItem("dianzan1", 0);
                        layer.msg('点赞成功', {
                            time: 1000, //20s后自动关闭
                        });
                        layui.use(['element'], function () {
                            var $ = layui.$;
                            $.ajax({
                                url: '/brand/showExcellent',
                                type: 'get',
                                success: function (map) {
                                    $("#z2").remove();
                                    $("#zan2").append("<a id='z2'>" + map.top[1].enjoy + "</a>")
                                }
                            });
                        });
                    }
                })
            } else if (lastname1 == 0) {
                $.ajax({
                    url: "/brand/quxiaodianzan",
                    type: "POST",
                    data: {
                        bid: $("#zan2").attr("myname")
                    },
                    success: function (data) {
                        $("#x22").remove();
                        $("#xh2").remove();
                        $("#x2").append("<a id='x22'>喜欢</a>")
                        localStorage.removeItem("dianzan1");
                        layer.msg('取消', {
                            time: 1000, //20s后自动关闭
                        });
                        layui.use(['element'], function () {
                            var $ = layui.$;

                            $.ajax({
                                url: '/brand/showExcellent',
                                type: 'get',
                                success: function (map) {
                                    $("#z2").remove();
                                    $("#zan2").append("<a id='z2'>" + map.top[1].enjoy + "</a>")
                                }
                            });
                        });
                    }
                })
            }
        });
        $("#qw3").click(function () {

            var lastname2 = localStorage.getItem("dianzan2");
            if (lastname2 == null) {
                $.ajax({
                    url: "/brand/dianzan",
                    type: "POST",
                    data: {
                        bid: $("#zan3").attr("myname")
                    },
                    success: function (data) {
                        $("#x33").remove();
                        $("#xh3").remove();
                        $("#x3").append("<a id='x33'>不喜欢</a>")
                        localStorage.setItem("dianzan2", 0);
                        layer.msg('点赞成功', {
                            time: 1000, //20s后自动关闭
                        });
                        layui.use(['element'], function () {
                            var $ = layui.$;

                            $.ajax({
                                url: '/brand/showExcellent',
                                type: 'get',

                                success: function (map) {
                                    $("#z3").remove();
                                    $("#zan3").append("<a id='z3'>" + map.top[2].enjoy + "</a>")
                                }
                            });
                        });
                    }
                })
            } else if (lastname2 == 0) {
                $.ajax({
                    url: "/brand/quxiaodianzan",
                    type: "POST",
                    data: {
                        bid: $("#zan3").attr("myname")
                    },

                    success: function (data) {
                        $("#x33").remove();
                        $("#xh3").remove();
                        $("#x3").append("<a id='x33'>喜欢</a>")
                        localStorage.removeItem("dianzan2");
                        layer.msg('取消', {
                            time: 1000, //20s后自动关闭

                        });
                        layui.use(['element'], function () {
                            var $ = layui.$;

                            $.ajax({
                                url: '/brand/showExcellent',
                                type: 'get',

                                success: function (map) {
                                    $("#z3").remove();
                                    $("#zan3").append("<a id='z3'>" + map.top[2].enjoy + "</a>")
                                }
                            });
                        });
                    }
                })
            }
        });
    });
</script>

<script>
    function pinglun1() {
        layui.use(['form'], function () {
            var $ = layui.$;
            var laydate = layui.laydate;
            var form = layui.form;
            layui.use(['element'], function () {
                var $ = layui.$;
                $.ajax({
                    url: '/brand/showExcellent',
                    type: 'get',
                    success: function (map) {
                        $("#p1").remove();
                        $("#ping1").append("<a id='p1'>" + map.top[0].pls + "</a>")

                        $("#p2").remove();
                        $("#ping2").append("<a id='p2'>" + map.top[1].pls + "</a>")

                        $("#p3").remove();
                        $("#ping3").append("<a id='p3'>" + map.top[2].pls + "</a>")
                    }
                });
            });
            var lay = layer.open({
                type: 1,
                area: ['500px', '450px'],
                skin: 'demo-class',
                content: $('#pinglun') //这里content是一个DOM，注意：最好该元素要存放在body最外层，否则可能被其它的相对元素所影响
            });
            //form自动赋值
            form.val("example", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="example" 对应的值
                "bid": $("#zan1").attr("myname")
            });
            //提交
            form.on('submit(formDemo1)', function (data) {
                layer.close(lay);
                $.ajax({
                    url: "/comment/add"
                    , type: "post"
                    , data: data.field
                    , success: function (d) {
                        if (d === 1) {
                            layer.msg('评论成功！！！', {
                                icon: 1,
                                time: 1500 //2秒关闭（如果不配置，默认是3秒）
                            }, function () {
                            });
                            $("#pinglun")[0].reset();
                            layui.form.render();
                        }
                    }
                });
                return false;
            });
        });
    }
    function pinglun2() {
        layui.use(['form'], function () {
            var $ = layui.$;
            var laydate = layui.laydate;
            var form = layui.form;
            layui.use(['element'], function () {
                var $ = layui.$;
                $.ajax({
                    url: '/brand/showExcellent',
                    type: 'get',
                    success: function (map) {
                        $("#p1").remove();
                        $("#ping1").append("<a id='p1'>" + map.top[0].pls + "</a>")
                        $("#p2").remove();
                        $("#ping2").append("<a id='p2'>" + map.top[1].pls + "</a>")
                        $("#p3").remove();
                        $("#ping3").append("<a id='p3'>" + map.top[2].pls + "</a>")
                    }
                });
            });
            var lay = layer.open({
                type: 1,
                area: ['500px', '450px'],
                skin: 'demo-class',
                content: $('#pinglun') //这里content是一个DOM，注意：最好该元素要存放在body最外层，否则可能被其它的相对元素所影响
            });
            //form自动赋值
            form.val("example", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="example" 对应的值
                "bid": $("#zan2").attr("myname")
            });
            //提交
            form.on('submit(formDemo1)', function (data) {
                layer.close(lay);
                $.ajax({
                    url: "/comment/add"
                    , type: "post"
                    , data: data.field
                    , success: function (d) {
                        if (d === 1) {
                            layer.msg('评论成功！！！', {
                                icon: 1,
                                time: 1500 //2秒关闭（如果不配置，默认是3秒）
                            }, function () {
                            });
                            $("#pinglun")[0].reset();
                            layui.form.render();
                        }
                    }
                });
                return false;
            });
        });
    }
    function pinglun3() {
        layui.use(['form'], function () {
            var $ = layui.$;
            var laydate = layui.laydate;
            var form = layui.form;
            layui.use(['element'], function () {
                var $ = layui.$;
                $.ajax({
                    url: '/brand/showExcellent',
                    type: 'get',
                    success: function (map) {
                        $("#p1").remove();
                        $("#ping1").append("<a id='p1'>" + map.top[0].pls + "</a>")
                        $("#p2").remove();
                        $("#ping2").append("<a id='p2'>" + map.top[1].pls + "</a>")
                        $("#p3").remove();
                        $("#ping3").append("<a id='p3'>" + map.top[2].pls + "</a>")
                    }
                });
            });
            var lay = layer.open({
                type: 1,
                area: ['500px', '450px'],
                skin: 'demo-class',
                content: $('#pinglun') //这里content是一个DOM，注意：最好该元素要存放在body最外层，否则可能被其它的相对元素所影响
            });
            //form自动赋值
            form.val("example", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="example" 对应的值
                "bid": $("#zan3").attr("myname")
            });
            //提交
            form.on('submit(formDemo1)', function (data) {
                layer.close(lay);
                $.ajax({
                    url: "/comment/add"
                    , type: "post"
                    , data: data.field
                    , success: function (d) {
                        if (d === 1) {
                            layer.msg('评论成功！！！', {
                                icon: 1,
                                time: 1500 //2秒关闭（如果不配置，默认是3秒）
                            }, function () {
                            });
                            $("#pinglun")[0].reset();
                            layui.form.render();
                        }
                    }
                });
                return false;
            });
        });
    }
    function dianzan() {
    }
</script>
<!--弹出层-->

<!-- 点击量最高4个 -->
<div class="serives-mobamu py-5" id="services">
    <div class="container py-xl-5 py-lg-3">
        <h3 class="tittle text-center text-wh font-weight-bold">热度最高的四个品牌</h3>
        <p id="inc61" class="sub-tittle text-center text-li mt-2 mb-sm-5 mb-4 pb-xl-3"></p>
        <div class="row welcome-bottom text-center">
            <div class="col-lg-3 col-sm-6 px-2">
                <div style="width:250px; height:300px;" class="welcome-grid bg-wh py-5 px-4">
                    <img id="img1" class="img-fluid">
                    <h4 class="mt-4 mb-3 text-bl">TOP1</h4>
                    <p id="top4"></p>
                </div>
            </div>
            <div class="col-lg-3 col-sm-6 mt-sm-0 mt-5 px-2">
                <div style="width:250px; height:300px;" class="welcome-grid bg-wh py-5 px-4">
                    <img id="img2" alt="" class="img-fluid">
                    <h4 class="mt-4 mb-3 text-bl">TOP2</h4>
                    <p id="top5"></p>
                </div>
            </div>
            <div class="col-lg-3 col-sm-6 mt-lg-0 mt-5 px-2">
                <div style="width:250px; height:300px;" class="welcome-grid bg-wh py-5 px-4">
                    <img id="img3" alt="" class="img-fluid">
                    <h4 class="mt-4 mb-3 text-bl">TOP3</h4>
                    <p id="top6"></p>
                </div>
            </div>
            <div class="col-lg-3 col-sm-6 mt-lg-0 mt-5 px-2">
                <div style="width:250px; height:300px;" class="welcome-grid bg-wh py-5 px-4">
                    <img id="img4" alt="" class="img-fluid">
                    <h4 class="mt-4 mb-3 text-bl">TOP4</h4>
                    <p id="top7"></p>
                </div>
            </div>
        </div>
    </div>
</div>
<!--改点击量最高名字-->
<script>
    layui.use(['element'], function () {
        var $ = layui.$;
        $.ajax({
            url: '/brand/showByHeat',
            type: 'get',
            success: function (map) {
                $("#img1").attr("src", map.top[0].blogo)
                $("#img2").attr("src", map.top[1].blogo)
                $("#img3").attr("src", map.top[2].blogo)
                $("#img4").attr("src", map.top[3].blogo)

                $("#top4").append("<h4>" + map.top[0].bname + "</h4>")
                $("#top5").append("<h4>" + map.top[1].bname + "</h4>")
                $("#top6").append("<h4>" + map.top[2].bname + "</h4>")
                $("#top7").append("<h4>" + map.top[3].bname + "</h4>")
            }
        });
    });
</script>

<!--优质评价-->
<section class="team-main-sec bg-li py-5" id="testi">
    <div class="container py-xl-5 py-lg-3">
        <h3 class="tittle text-center text-bl font-weight-bold">优质评价</h3>
        <p id="inc71" class="sub-tittle text-center mt-2 mb-sm-5 mb-4 pb-xl-3"></p>


        <div class="row text-center">

            <div class="col-lg-4 col-md-6 team-gd-info">
                <div class="team-gd">
                    <div align="center" style="width:300px; height:100px;" class="team-img mb-4">
                        <img style="width:300px; height:150px;" id="pj1"  class="img-fluid" alt="user-image">
                    </div>
                    <div style="width:300px; height:400px;" class="team-info">
                        <h3 id="pn11"><span id="pn12" class="sub-tittle-team"></span></h3>
                        <div id="xing1" class="list-unstyled my-md-4 my-3">

                        </div>
                        <p id="pn14"></p>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 team-gd-info mt-md-0 mt-5">
                <div class="team-gd">
                    <div align="center" style="width:300px; height:100px;" class="team-img mb-4">
                        <img  style="width:300px; height:150px;" id="pj2"  class="img-fluid" alt="user-image">
                    </div>
                    <div style="width:300px; height:400px;" class="team-info">
                        <h3 id="pn21"><span id="pn22" class="sub-tittle-team"></span></h3>
                        <div id="xing2" class="list-unstyled my-md-4 my-3">
                        </div>
                        <p id="pn24"></p>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 mx-lg-0 mx-md-auto team-gd-info mt-lg-0 mt-5">
                <div class="team-gd">
                    <div align="center" style="width:300px; height:100px;" class="team-img mb-4">
                        <img align="middle" id="pj3" style="width:300px; height:150px;" class="img-fluid" alt="user-image">
                    </div>
                    <div style="width:300px; height:400px;" class="team-info">
                        <h3 id="pn31"><span id="pn32" class="sub-tittle-team"></span></h3>
                        <div id="xing3" class="list-unstyled my-md-4 my-3">
                        </div>
                        <p id="pn34"></p>
                    </div>
                </div>
            </div>
            <a href="pinglun.html" class="btn button-style-2 mt-sm-5 mt-4" >更多</a>
        </div>
    </div>
</section>
<!--改评论内容-->
<script>
    layui.use(['element', 'rate'], function () {
        var $ = layui.$;
        var rate = layui.rate;
        $.ajax({
            url: '/comment/randomComment',
            type: 'get',
            success: function (map) {
                rate.render({
                    elem: '#xing1'
                    , value: map.data[0].star
                    , readonly: true
                    , half: true //开启半星
                });
                rate.render({
                    elem: '#xing2'
                    , value: map.data[1].star
                    , readonly: true
                    , half: true //开启半星
                });
                rate.render({
                    elem: '#xing3'
                    , value: map.data[2].star
                    , readonly: true
                    , half: true //开启半星
                });
                $("#pj1").attr("src", map.data[0].blogo)
                $("#pj2").attr("src", map.data[1].blogo)
                $("#pj3").attr("src", map.data[2].blogo)

                $("#pn11").append("<h4>" + map.data[0].bname + "</h4>")
                $("#pn12").append("<h4>" + map.data[0].user + "</h4>")
                $("#pn14").append("<h4>" + map.data[0].comment + "</h4>")


                $("#pn21").append("<h4>" + map.data[1].bname + "</h4>")
                $("#pn22").append("<h4>" + map.data[1].user + "</h4>")
                $("#pn24").append("<h4>" + map.data[1].comment + "</h4>")

                $("#pn31").append("<h4>" + map.data[2].bname + "</h4>")
                $("#pn32").append("<h4>" + map.data[2].user + "</h4>")
                $("#pn34").append("<h4>" + map.data[2].comment + "</h4>")
            }
        });
    });
</script>

<!-- 加入我们 -->
<div class="banner-bottom py-5">
    <div class="d-md-flex container py-xl-3 py-lg-3">
        <div class="banner-left-bottom-w3ls">
            <h6 class="text-wh let">享受你的美</h6>
            <h3 class="text-wh my-3">加入我们</h3>
            <p id="inc11"></p>
            <p id="inc12"></p>
    </div>
        <div class="button offset-lg-2 offset-md-1">
            <a href="book.html" class="btn w3ls-button-mobamu">更多</a>
        </div>
    </div>
</div>
<!-- 拥抱你的美 -->
<div class="middle py-5">
    <div class="container py-xl-5 py-lg-3">
        <div class="welcome-left text-center py-md-5 py-3">
            <h3>发现你的美，享受你的美，拥抱生活！</h3>
            <a href="contact.html" class="btn button-style button-style mt-sm-5 mt-4">联系我们</a>
        </div>
    </div>
</div>

<!-- 尾 -->
<footer class="py-5">
    <div class="container pt-xl-4">
        <div class="row footer-top">
            <div class="col-lg-4 col-md-6 footer-grid_section_1its">
                <h2 class="logo-2 mb-lg-4 mb-3">
                    <a href="index.html" class="text-uppercase text-wh">Elvis</a>
                </h2>
                <!-- Map -->
                <div class="map-fo">
                    <iframe src=""></iframe>
                </div>
                <!-- //Map -->
            </div>
            <div class="col-lg-2 col-md-6 footer-grid_section_1its mt-md-0 mt-4">
                <h3 class="footer-title text-uppercase text-wh mb-lg-4 mb-3">链接</h3>
                <ul class="list-unstyled">
                    <li class="mb-3">
                        <a href="index.html">首页</a>
                    </li>
                    <li class="mb-3">
                        <a href="about.html">关于我们</a>
                    </li>
                    <li class="mb-3">
                        <a href="brand.html?bcategory=4">所有品牌</a>
                    </li>
                    <li class="mb-3">
                        <a href="#services">热度最高</a>
                    </li>
                    <li class="mb-3">
                        <a href="contact.html">联系我们</a>
                    </li>
                </ul>
            </div>
            <div class="col-lg-3 col-md-6 footer-grid_section_1its mt-lg-0 mt-4">
                <h3 class="footer-title text-uppercase text-wh mb-lg-4 mb-3">联系方式</h3>
                <div class="contact-info">
                    <div class="footer-style-w3ls mb-4">
                        <h4 class="text-li mb-2">联系电话</h4>
                        <p>+121 098 8907 9987</p>
                    </div>
                    <div class="footer-style-w3ls mb-4">
                        <h4 class="text-li mb-2">联系邮箱 </h4>
                        <p><a href="mailto:info@example.com">info@example.com</a></p>
                    </div>
                    <div class="footer-style-w3ls mb-4">
                        <h4 class="text-li mb-2">联系地址</h4>
                        <p>Honey Avenue, New York City</p>
                    </div>
                </div>
            </div>
            <div class="col-lg-3 col-md-6 footer-grid_section_1its mt-lg-0 mt-4">
                <!-- social icons -->
                <div class="mobamuinfo_social_icons">
                    <h3 class="footer-title text-uppercase text-wh mb-lg-4 mb-3">感谢使用</h3>
                    <p>我们是一个公益品牌宣传网站，还在建设中，有什么不周之处敬请谅解！</p>

                </div>
                <!-- social icons -->
            </div>
        </div>
    </div>
</footer>

<div class="cpy-right text-center py-3">
    <p>Copyright &copy; 2019.Company name All rights reserved </a></p>
</div>

<a href="#home" class="move-top text-center"></a>

<!--改页面-->
<script>
    layui.use(['element'], function () {
        var $ = layui.$;
        $.ajax({
            url: '/intro/showall',
            type: 'get',
            success: function (map) {

                $("#inc11").append("<a>"+map[0].title+"</a>")
                $("#inc12").append("<a>"+map[1].title+"</a>")

                $("#inc21").append("<a>"+map[2].title+"</a>")
                $("#inc22").append("<a>"+map[3].title+"</a>")


                $("#inc31").append("<a>"+map[4].title+"</a>")
                $("#inc32").append("<a>"+map[5].title+"</a>")
                $("#inc33").append("<a>"+map[6].title+"</a>")
                $("#inc34").append("<a>"+map[7].title+"</a>")
                $("#inc35").append("<a>"+map[8].title+"</a>")
                $("#inc36").append("<a>"+map[9].title+"</a>")
                $("#inc37").append("<a>"+map[10].title+"</a>")
                $("#inc38").append("<a>"+map[11].title+"</a>")
                $("#inc39").append("<a>"+map[12].title+"</a>")
                $("#inc310").append("<a>"+map[13].title+"</a>")


                $("#inc41").append("<a>"+map[14].title+"</a>")
                $("#inc42").append("<a>"+map[15].title+"</a>")
                $("#inc43").append("<a>"+map[16].title+"</a>")
                $("#inc44").append("<a>"+map[17].title+"</a>")
                $("#inc45").append("<a>"+map[18].title+"</a>")


                $("#inc51").append("<a>"+map[19].title+"</a>")
                $("#inc61").append("<a>"+map[20].title+"</a>")
                $("#inc71").append("<a>"+map[21].title+"</a>")




            }
        });
    });
</script>
</body>

</html>